Release 10.1A: OpenEdge Development:
Web Services


Managing operation parameters

As previously described (see Chapter 8 "Analyzing WSDL for Progress 4GL Access to Web Services"), the data types that you specify for parameters in the 4GL invocations of Web service operations must conform to a set of OpenEdge-supported castings established for corresponding XML Schema data types. The OpenEdge WSDL Analyzer provides all of the information you need to build interfaces between your 4GL application and the Web service by documenting all of the Web service operations and how they can be mapped to the 4GL, including the suggested (or recommended) 4GL data types to use for XML Schema simple data type parameters.

Depending on the results you want to achieve, you might use an alternative data type dictated by the alternative castings supported by OpenEdge between XML Schema simple data types and 4GL data types. Consistent with compatible data types in the 4GL, OpenEdge implicitly converts between any XML Schema data type and any 4GL data type included in the supported casting. If OpenEdge cannot complete the specified conversion, it generates a run-time error.

You can also map all XML Schema simple data types to the 4GL CHARACTER or LONGCHAR type, because the SOAP messages used to exchange parameter values are XML character data. For XML Schema simple data types where CHARACTER is not the suggested 4GL data type, using a CHARACTER or LONGCHAR causes OpenEdge to assume that you are passing the XML Schema-formatted string (the actual string value of the XML Schema element) as the value for the parameter. This allows you to perform your own transformation on the value within your 4GL application and to manage the value as you see fit. In doing this, you must format the CHARACTER/LONGCHAR values properly for any INPUT parameters to conform with the XML Schema data type defined for the Web service parameter by the WSDL. The only processing that OpenEdge does when passing XML Schema-formatted values is to perform any code page conversion required on the character data (for example, between the CPINTERNAL code page setting and UTF-8) and to validate that the format of the data is acceptable for the XML Schema data type. OpenEdge does no range or value checking that might be specified in the WSDL file.

For XML Schema complex types, data types containing multiple XML Schema data elements (including other complex types), you must map them to either the 4GL CHARACTER or LONGCHAR type. Complex type values contain multiple values structured in a hierarchical fashion, according to the arrangement of XML elements that describe them. To manage these values, you must work with the serialized XML directly, typically using the XML parsers in the 4GL. For more information, see the "Managing complex data" section.

In general, if the invocation of a Web service operation fails for any reason, OpenEdge sets all OUTPUT and function return values to the Unknown value (?).


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095